from sqlalchemy import Column, Integer, SmallInteger

from .base import BaseModel


class GoodsImagesDo(BaseModel):
    __tablename__ = "goods_images"
    __table_args__ = {"comment": "商品图片"}

    id = Column(Integer,
                primary_key=True,
                autoincrement=True,
                comment='主键ID')
    goods_id = Column(Integer, index=True, comment='商品id')
    image_id = Column(Integer, comment="图片id")
    img_sort = Column(Integer, nullable=True, comment='顺序')
    default_flag = Column(SmallInteger, nullable=True, comment='是否默认图 0-否 1-是')
